package ipt.dao.f3;


import java.io.File;
import java.sql.SQLException;

public class ConnectionFactoryTXT {
	
        private static final String FILE_PATH = "data/";
        private static final String FILE_NAME = "Alumnos.txt";
        private static ConnectionFactoryTXT connectionFactory = null;
        private File file=null;

        private ConnectionFactoryTXT() {
                try {
                        file=new File (FILE_PATH+FILE_NAME);
                } catch (Exception e) {
                        e.printStackTrace();
                }
        }

        public File getConnection() throws SQLException {
                return file;
        }

        public static ConnectionFactoryTXT getInstance() {
                if (connectionFactory == null) {
                        connectionFactory = new ConnectionFactoryTXT();
                }
                return connectionFactory;
        }
}